interface AjaxOption {
  type?:'GET'|'POST'
  dataType?:'html'|'xml'|'jsonp'|'json'
  data?:object
  async?:boolean
  processData?:boolean
  contentType?:'application/x-www-form-urlencoded'|'application/json'
  timeout?:number
  cache?:boolean
  headers?:Partial<{
    accpet:string

  }>
  statusCodeHandlers?:{
    404?():void
    500?():void
  }
  success?():void
  error?():void
  complete?():void
}

export function ajax(url:string, option?:AjaxOption) {
  const {
    type = 'GET',
    dataType = 'html',
    async = true,
    processData = false,
  } = option || {}

  if(dataType === 'jsonp') url += `?callback=jQueryf008e0cc3f8d57bea7e161484cca6bcd`


}

ajax('', {
  contentType:'application/x-www-form-urlencoded',
  headers:{
    
  },
  statusCodeHandlers:{
    
  }
})
